package com.tom.architect.party3.day26.okhttp;

/**
 *
 */
public enum Method {
    POST("POST"), GET("GET"), HEAD("HEAD"),
    DELETE("DELETE"), PUT("PUT"), PATCH("PATCH");

    // 完成枚举，名称的映射转换。
    public String name;
    Method(String name) {
        this.name = name;
    }

    public boolean doOutput() {
        switch (this) {
            case POST:
            case PUT:
                return true;
        }
        return false;
    }
}
